<html>
<head><meta charset="utf-8"><title>grayed-out cfg is &lt;3 · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/grayed-out.20cfg.20is.20.3C3.html">grayed-out cfg is &lt;3</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="216282434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/grayed-out%20cfg%20is%20%3C3/near/216282434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/grayed-out.20cfg.20is.20.3C3.html#216282434">(Nov 10 2020 at 22:16)</a>:</h4>
<p><span class="user-mention" data-user-id="211727">@Jonas Schievink</span> I am adding features to the once_cell crate, and the new handling of <code>#[cfg]</code> attributes is so nice!</p>
<p>If I didn't knew the hacky way it is implemented, I'd assumed a first-class feature :D</p>



<a name="216282450"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/grayed-out%20cfg%20is%20%3C3/near/216282450" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/grayed-out.20cfg.20is.20.3C3.html#216282450">(Nov 10 2020 at 22:16)</a>:</h4>
<p>Cool!</p>



<a name="216282542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/grayed-out%20cfg%20is%20%3C3/near/216282542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/grayed-out.20cfg.20is.20.3C3.html#216282542">(Nov 10 2020 at 22:17)</a>:</h4>
<p>What's so hacky about it though? It's not particularly clean, but everything happens in the right places IMO (at least in the current architecture)</p>



<a name="216282962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/grayed-out%20cfg%20is%20%3C3/near/216282962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/grayed-out.20cfg.20is.20.3C3.html#216282962">(Nov 10 2020 at 22:21)</a>:</h4>
<p>Like, the fact that it is an unused diagnostics, which just doesn't show an error</p>



<a name="216283066"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/grayed-out%20cfg%20is%20%3C3/near/216283066" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/grayed-out.20cfg.20is.20.3C3.html#216283066">(Nov 10 2020 at 22:22)</a>:</h4>
<p>Oh, okay</p>



<a name="216283078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/grayed-out%20cfg%20is%20%3C3/near/216283078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/grayed-out.20cfg.20is.20.3C3.html#216283078">(Nov 10 2020 at 22:22)</a>:</h4>
<p>Yeah, I suppose it's not <em>really</em> meant for this :D</p>



<a name="216283105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/grayed-out%20cfg%20is%20%3C3/near/216283105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/grayed-out.20cfg.20is.20.3C3.html#216283105">(Nov 10 2020 at 22:23)</a>:</h4>
<p>But it fits well, and looks exactly like it should in VS Code</p>



<a name="216293409"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/grayed-out%20cfg%20is%20%3C3/near/216293409" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Paul Faria <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/grayed-out.20cfg.20is.20.3C3.html#216293409">(Nov 11 2020 at 00:23)</a>:</h4>
<p>It's also going to make testing the cfg configuration REALLY easy on the front-end.</p>



<a name="216338007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/grayed-out%20cfg%20is%20%3C3/near/216338007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dirkjan Ochtman <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/grayed-out.20cfg.20is.20.3C3.html#216338007">(Nov 11 2020 at 12:17)</a>:</h4>
<p>I also love it FWIW :)</p>



<a name="218497805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/grayed-out%20cfg%20is%20%3C3/near/218497805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> woody77 <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/grayed-out.20cfg.20is.20.3C3.html#218497805">(Dec 01 2020 at 23:39)</a>:</h4>
<p>editorUnnecessaryCode.opacity is the theme setting for it:</p>
<p><code>"editorUnnecessaryCode.opacity": "#0007",</code></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>